<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>
		<link rel='StyleSheet' media='screen' type="text/css" href="{$smarty.const.EXT_RESOURCE_DIR}main.css"/>
		<link rel='StyleSheet' media='screen' type="text/css" href="{$smarty.const.EXT_JS_PLUGIN_DIR}jquery-ui-1.8.14/css/custom-theme/jquery-ui-1.8.16.custom.css" />	
		<link rel='StyleSheet' media='screen' type="text/css" href="{$smarty.const.EXT_RESOURCE_DIR}debug.css"/>
		<link rel='StyleSheet' media='screen' type="text/css" href="{$smarty.const.EXT_JS_PLUGIN_DIR}ui-datatables/css/jui.css"/>
		<link rel='StyleSheet' media='screen' type="text/css" href="{$smarty.const.EXT_JS_PLUGIN_DIR}context-menu/jquery.contextMenu.css"/>
		<script type="text/javascript" src="{$smarty.const.EXT_JS_PLUGIN_DIR}jquery-1.7.1.js"></script>
		<script type="text/javascript" src="{$smarty.const.EXT_JS_PLUGIN_DIR}jquery-ui-1.8.14/js/jquery-ui-1.8.14.custom.min.js"></script>
		<script type="text/javascript" src="{$smarty.const.EXT_JS_PLUGIN_DIR}jquery-ui-1.8.14/js/jquery.ui.datepicker-sk.js"></script>
		<script type="text/javascript" src="{$smarty.const.EXT_JS_PLUGIN_DIR}jquery-validate/jquery.validate.js"></script>
		<script type="text/javascript" src="{$smarty.const.EXT_JS_PLUGIN_DIR}ui-datatables/js/jquery.dataTables.js"></script>
		<script type="text/javascript" src="{$smarty.const.EXT_JS_PLUGIN_DIR}ui-datatables/js/TableTools.js"></script>
		<script type="text/javascript" src="{$smarty.const.EXT_JS_PLUGIN_DIR}ui-datatables/js/ZeroClipboard.js"></script>
		<script type="text/javascript">
		    AJAX_URL = '{$smarty.const.EXT_RESOURCE_DIR}ajax.php';
		    {literal}
				$.ajaxSetup({
			    	url: AJAX_URL,
					dataType: "JSON",
					type: "POST",
					error: function(XHR, status, message){
						console.log("ERROR AT AJAX CALL\n Status: '" + status + "'\n Message: '" + message + "'");
					}
			    });
			    $(function(){
					$(".accordion").accordion();
					$(".button").button();
					$(".datepicker").datepicker();
					$(".search-button").button({ 
						icons: {
							primary:'ui-icon-search'
						} 
					});
					$(".add-button").button({ 
						icons: {
							primary:'ui-icon-plusthick'
						} 
					});
					$(".options-button").button({ 
						icons: {
							primary:'ui-icon-wrench'
						} 
					});
					$(".logout-button").button({ 
						icons: {
							primary:'ui-icon-power'
						} 
					});
				})
			{/literal}
		</script>
		<title>{$data.title}</title>
	</head>
	<body>
		<div id="wrapper">
			{include file="`$smarty.const.TEMPLATE_DIR`main/snippets/header.tpl"}
			{$data.page}
			<div style="clear: both;">&nbsp;</div>
      		{include file="`$smarty.const.TEMPLATE_DIR`main/snippets/footer.tpl"}
        </div>	
		<div style="clear: both;">&nbsp;</div>
      		
		{include_module controller="debug/debug"}
	</body>
</html>